{% extends 'base.html' %}
{% load staticfiles %}
{% block css %}

{% endblock %}
{% block title %}
    <title>立案信息上报</title>
{% endblock %}
{% block body %}
    <div class="container" style="padding: 0px">
        <form action="" method="post" novalidate>
            {% csrf_token %}
            <input type="text" hidden name="aj_user" id="user">
            <div class="panel panel-info">
                <div class="panel-heading" data-toggle="collapse" data-parent="#accordion" href="#collapse1">
                    立案信息上报
                </div>
                <div id="collapse1" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div class="form-group col-md-3 {% if obj.aj_xingzhi.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_xingzhi">{{ obj.aj_xingzhi.label }}</label>
                            {{ obj.aj_xingzhi }}
                            <span class="help-block">{{ obj.aj_xingzhi.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_zhonglei.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_zhonglei">{{ obj.aj_zhonglei.label }}</label>
                            {{ obj.aj_zhonglei }}
                            <span class="help-block">{{ obj.aj_zhonglei.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_sheanjine.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_sheanjine">{{ obj.aj_sheanjine.label }}</label>
                            {{ obj.aj_sheanjine }}
                            <span class="help-block">{{ obj.aj_sheanjine.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_laiyuan.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_laiyuan">{{ obj.aj_laiyuan.label }}</label>
                            {{ obj.aj_laiyuan }}
                            <span class="help-block">{{ obj.aj_laiyuan.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_time1.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_time1">{{ obj.aj_time1.label }}</label>
                            {{ obj.aj_time1 }}
                            <span class="help-block">{{ obj.aj_time1.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_dangshiren.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_dangshiren">{{ obj.aj_dangshiren.label }}</label>
                            {{ obj.aj_dangshiren }}
                            <span class="help-block">{{ obj.aj_dangshiren.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_faren.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_faren">{{ obj.aj_faren.label }}</label>
                            {{ obj.aj_faren }}
                            <span class="help-block">{{ obj.aj_faren.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-3 {% if obj.aj_jigoudaima.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_jigoudaima">{{ obj.aj_jigoudaima.label }}</label>
                            {{ obj.aj_jigoudaima }}
                            <span class="help-block">{{ obj.aj_jigoudaima.errors.0 }}</span>
                        </div>
                        <div class="form-group col-md-6 {% if obj.aj_anyou.errors.0 %}has-error{% endif %}">
                            <label for="id_aj_anyou">{{ obj.aj_anyou.label }}</label>
                            {{ obj.aj_anyou }}
                            <span class="help-block">{{ obj.aj_anyou.errors.0 }}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6 col-md-offset-3" style="text-align: center">
                    <button class="btn btn-info" type="reset"
                            style="margin:10px 10px 20px 10px;text-align: center">重置
                    </button>
                    <button class="btn btn-success" type="submit"
                            style="margin:10px 10px 20px 10px;text-align: center">提交
                    </button>
                </div>
            </div>
        </form>
    </div>
{% endblock %}
{% block js %}
    <script>
    $("input:not(#user),select").addClass("form-control")
    $("#id_aj_time1").attr("type", "date")
    //消除错误提示
    $(":input").click(function () {
        $(this).next().text("");
        $(this).parents('div').removeClass("has-error")
    })
</script>
{% endblock %}
